﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using compusUpdates.Properties;

namespace compusUpdates {
    public partial class Login : Form {
        public Login() {
            InitializeComponent();
            textUsername.Text = Settings.Default.username;
            textPassword.Text = Settings.Default.password;
        }

        private void buttonOK_Click(object sender, EventArgs e) {
            if (textUsername.Text != "" && textPassword.Text != "") {
                //save to settings
                Settings.Default.username = textUsername.Text;
                Settings.Default.password = textPassword.Text;
                Settings.Default.Save();

                this.Hide();
            } else {
                MessageBox.Show("Wrong Credentials!");
            }
        }

    }
}
